package com.pgytesting.secondhandcar.controller.mcpcar;

import com.pgytesting.secondhandcar.service.McpCarDealerInformationService;
import com.pgytesting.secondhandcar.vo.ResponseMessage;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author : frosty0804@gmail.com
 * @version : v1.0
 * @projectName : secondhandcar
 * @className : UserQueryController
 * @description : TODO(销售信息查询类)
 * @date : 2019/9/2 09:32
 */
@Slf4j
@RequestMapping("/sales/queryUser")
@RestController
public class SalesQueryController {

    @Autowired
    McpCarDealerInformationService mcpCarDealerInformationService;


    /**
     * 查询用户登录信息
     *
     * @return
     */
    @RequestMapping(value = "/getUserInf", method = RequestMethod.GET)
    public ResponseMessage getUserInf() {
        try {
            return mcpCarDealerInformationService.getUserInf();
        } catch (Exception e) {
            log.error("服务异常", e);
            return ResponseMessage.errorResponse("服务异常");
        }

    }
}
